package test;

import java.util.Scanner;

public class 超市会员 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //提醒
        System.out.println("您是会员吗 1代表是  0代表不是");
        int vip = sc.nextInt();
        System.out.println("请输入您购买商品的价格");
        double money = sc.nextDouble();

        double outmoney = 0;
        if (vip == 1) {
            if (money >= 200) {
                outmoney = money * 0.75;
            } else if (money > 0 && money < 200) {
                outmoney = money * 0.8;
            } else {
                System.out.println("您输入金额有误");
            }
        } else {
            if (money >= 100) {
                outmoney = money * 0.9;
            } else if (money > 0 && money < 100) {
                outmoney = money;
            } else {
                System.out.println("您输入金额有误");
            }
        }
        System.out.println("您购买商品的价格是" + outmoney);

    }

}
